package com.web.spider.youku.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author cherrish
 * @name RegexUtil
 * @date 2019/4/7 21:56
 * @desc TODO
 */
public class RegexUtil {
    public static String getPageInfoByRegex(String content, Pattern pattern, int groupNo){
        Matcher matcher = pattern.matcher(content);
        if(matcher.find()){
            return matcher.group(groupNo).trim();
        }
        return "0";
    }
}
